//
//  RegisterView.m
//  UI豆瓣
//
//  Created by dllo on 15/10/26.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "RegisterView.h"

@implementation RegisterView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createLogin];
    }
    return self;
}

- (void)createLogin{
    
    NSMutableArray *labelArr = [NSMutableArray arrayWithObjects:@"用户名:", @"密码:", @"确认密码:", @"邮箱:", @"联系方式:",nil];
    for (int i = 0; i < labelArr.count; i++) {
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(30, 50 + i * 50, 90, 40)];
        label.text = [labelArr objectAtIndex:i];
        label.font = [UIFont systemFontOfSize:20];
        [self addSubview:label];
        [label release];
    }
    
    self.nameTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 50, 220, 40)];
    self.nameTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.nameTextField.placeholder = @"请输入用户名";
    [self addSubview:self.nameTextField];
    [_nameTextField release];
    
    self.passwordTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 100, 220, 40)];
    self.passwordTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.passwordTextField.placeholder = @"请输入密码";
    self.passwordTextField.secureTextEntry = YES;
    [self addSubview:self.passwordTextField];
    [_passwordTextField release];
    
    self.okPasswordTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 150, 220, 40)];
    self.okPasswordTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.okPasswordTextField.placeholder = @"再次输入密码";
    self.okPasswordTextField.secureTextEntry = YES;
    [self addSubview:self.okPasswordTextField];
    [_okPasswordTextField release];
    
    self.emailTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 200, 220, 40)];
    self.emailTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.emailTextField.placeholder = @"请输入邮箱";
    [self addSubview:self.emailTextField];
    [_emailTextField release];

    self.numberTextField = [[UITextField alloc] initWithFrame:CGRectMake(130, 250, 220, 40)];
    self.numberTextField.borderStyle = UITextBorderStyleRoundedRect;
    self.numberTextField.placeholder = @"请输入邮箱";
    [self addSubview:self.numberTextField];
    [_numberTextField release];
    
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
